package org.rsbot.event.impl;

import java.awt.Graphics;
import org.rsbot.bot.Bot;
import org.rsbot.event.listeners.TextPaintListener;
import org.rsbot.script.methods.Game;
import org.rsbot.script.methods.MethodContext;
import org.rsbot.script.methods.Players;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.util.StringUtil;

public class TAnimation
  implements TextPaintListener
{
  private MethodContext ctx;

  public TAnimation(Bot paramBot)
  {
    this.ctx = paramBot.getMethodContext();
  }

  public int drawLine(Graphics paramGraphics, int paramInt)
  {
    int i;
    if (this.ctx.game.isLoggedIn())
      i = this.ctx.players.getMyPlayer().getAnimation();
    else {
      i = -1;
    }
    StringUtil.drawLine(paramGraphics, paramInt++, "Animation " + i);
    return paramInt;
  }
}